package com.sinog.biz.mapper.havexml;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sinog.core.domain.PrisonerMainExcelTemp;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * @desc 主表批量导入mapper
 * @author -
 * @date 2020-01-19-11:18
 */
public interface PrisonerMainExcelTempMapper extends BaseMapper<PrisonerMainExcelTemp> {

    /**
     * 查询预安置人员信息录入列表
     * @param page page
     * @param params params
     * @return List<Map < String,String>>
     */
    List<Map<String,String>> getInmatesList(Page<Map<String,String>> page,@Param("params") Map<String,Object> params);

    /**
     * 删除服刑人员信息（逻辑删除）excel
     * @param prinum prinum
     * @return int
     */
    int updateDelFlagByPrinum(String prinum);

    /**
     * 分组查询uuid
     * @param date date
     * @return List<Map < String,String>>
     */
    List<Map<String,String>> getUuidList(@Param("date") String date);

    /**
     * 批量删除服刑人员信息（逻辑删除）excel
     * @param prinumLists prinumLists
     * @return int
     */
    int updateDelFlagByPrinums(List<String> prinumLists);

    /**
     * 根据犯罪编号检查该犯罪编号对应的主表是否checkflag=0
     * @param priNum priNum
     * @return int
     */
    int selectMainByCheckFlag(@Param("priNum") String priNum);

    /**
     * 更新主表的success_flag字段为0
     * @param priNum priNum
     * @return int
     */
    int updateMainSuccessFlag(@Param("priNum") String priNum);
}